#include<stdio.h>
struct Time
{
    int hour;
    int minute;
    int second;
};
int main()
{
    struct Time before;
    scanf("%d:%d:%d", &before.hour, &before.minute, &before.second);

    int n;
    scanf("%d", &n);

    before.second += n;
    if(before.second >= 60)
    {
        before.second %= 60;
        before.minute += 1;
        if(before.minute >= 60)
        {
            before.minute %= 60;
            before.hour += 1;
            if(before.hour >= 24)
            {
                before.hour -= 24;
            }
        }
    }

    printf("%02d:%02d:%02d\n", before.hour, before.minute, before.second);
    
    return 0;
}
